#ifndef PARTICLESYSTEM_H
#define PARTICLESYSTEM_H

#include "Vector3.h"
#include "Particle.h"
#include "ParticleSystemData.h"

struct ParticleSystem
{
	// info we read from xml
	ParticleSystemData info;
	Vector3 position;
	Vector3 customDirection;
	// info usable for updating the system
	bool isDead;
    bool m_bRender;
    bool m_bStopSpawning;
    
	Particles particles;
    
	ParticleSystem():isDead(false), m_bRender(true) {}
	~ParticleSystem()
	{
		particles.clear();
	}
	// initialize the particle system
	//void initialize( const char* particleSystemName );
	void initialize( const char* particleSystemName, const Vector3 &pPosition, const Vector3 &pDirection);
    // resets all the partiles, keeping size, position and everything of the system
    void resetParticles();
	// to spawn a new particle
	void initializeParticle( Particle &particle );
	// update the particles of the particle system
	void update( );
    // kill the particle system
    void die();
};


#endif
